package portal.mybatis.dao.service;

import java.util.ArrayList;
import java.util.List;

import net.sf.json.JSONObject;

public class BaseService {
	protected <T> List<Object>  convert2OjbectList(List<T>l){
		if(l==null ||l.size()==0)
			return null;
		List<Object > list = new ArrayList<Object>();
		for(T comp:l){
			JSONObject json= JSONObject.fromObject(comp);
			list.add(json);
		}
		if(list==null ||list.size()==0)
			return null;
		return list;
	}
}
